package com.kayden.springboot.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController2 {

    //即支持GET 又支持POST
    @RequestMapping("/m1")
    public String m1() {
        return "m1";
    }

    //只支持GET
    @RequestMapping(value = "/m2",method = RequestMethod.GET)//方法路径
    public String m2() {
        return "m2";
    }

    @GetMapping("/m4")
    public String m4() {
        return "m4";
    }

    //只支持POST
    @RequestMapping(value = "/m3",method = RequestMethod.POST)
    public String m3() {
        return "m3";
    }

    @PostMapping("/m5")
    public String m5() {
        return "m5";
    }


}
